package com.net.redis_plus.pojo;

import lombok.Data;

@Data
public class JsonData {

    private int code;

    private String msg;

    private Object data;


    public JsonData() {
    }

    public JsonData(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static JsonData builderSuccess(Object data) {
        return new JsonData(0,"success",data);
    }

    public static JsonData builderSuccess(){
        return new JsonData(0,"success","ok");
    }
}
